home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 June
/
EnigmA AMIGA RUN 19 (1997)(G.R. Edizioni)(IT)[!][issue 1997-06][EAR-CD III].iso
/
recent1
/
ahp404.lha
/
AHP4
/
DOpusSkripts
/
AHPBBS.dopus5
< prev
next >
Wrap
Text File
|
1997-05-21
|
4KB
|
205 lines
/* AHPBBS.dopus5 */
/*
Die angewählten Dateien werden in die ausgewählte Rubrik der AHP-BBS
eingespielt.
*/
options results
IF ~SHOW('Ports','rexx_AHP') THEN DO
Alertbox 'AHP4 ist nicht aktiv!'
exit 5
end
IF ~SHOW('Ports','DOPUS.1') THEN DO
Alertbox 'OPUS ist nicht aktiv!'
exit 5
end
address 'DOPUS.1'
lister query source
if result="RESULT" then exit 0
listernr = result
lister query listernr path
if result="RESULT" then exit 0
sourcedir = result
entries = 0
illegalfound = 0
mycall = "DG9BJA" /* <== Muß angepaßt werden !!! */
lister query listernr numselfiles
if result = 0 then exit 0
max = result
result = ""
lister getstring listernr '"Einspielrubrik (z.B. dl6ocl @ dk0mav)?"'
if result = "" then exit 0
board = upper(result)
/*
board zerlegen in zielboard und ziel
*/
if board = "" then exit
board = translate(board, " ", "@")
zielboard = strip(word(board, 1))
ziel = strip(word(board, 2))
board = zielboard
if ziel = "" then do
ziel = "AHP"
end
call Init_Board(zielboard)
if GetClip(zielboard) = "BUSY" then do
say 'Rubrik ist blockiert. :-('
exit
end
lister request listernr '"Transfer einzeln(J) oder zusammen(N)?" Ja|Nein'
einzeln = rc
if ~einzeln then do
result = ""
lister getstring listernr '"Basisbezeichnung (z.B. Test.lha.)?"'
if result = "" then do
Call SetClip(zielboard, "FREE")
exit
end
basis = result
if basis = einzeln then do
Call SetClip(zielboard, "FREE")
exit
end
lister getstring listernr '"Endung? (z.B. /04)"'
termi = result
if termi = basis then do
Call SetClip(zielboard, "FREE")
exit
end
end
m = GetLastEntry(zielboard)
m = m + 1
call SetClip(zielboard, "BUSY")
lister query listernr selfiles stem files
do counter = 0 to files.count-1
name = files.counter
sourcename = sourcedir||name
endung = right(name, 3)
upname = basis||right(name, 3)
address 'rexx_AHP'
'getsystime'
zeit = AdaptTime(result)
address 'DOPUS.1'
erfolg =0
if ~einzeln & upper(left(endung, 1)) ~= "P" & upper(endung) ~= "7PL" then do
if illegalfound = 0 then do
alertbox "Keine 7+-Datei!!"
illegalfound = 1
end
end
else if ~einzeln then do
titel = upname||termi
erfolg = 1
end
else do
result = ""
lister getstring listernr '"Welcher Titel?"'
if result = "" then do
call SetClip(zielboard, "FREE")
exit
end
titel = result
erfolg = 1
end
if erfolg then do
text = sourcename||" in Rubrik "||zielboard||" @ "||ziel||" aufgenommen"
say text
if Open(entryinfo, "ahp4:BBS/"||zielboard||"/"||m||".entr", "W") then do
call writeln(entryinfo, mycall)
call writeln(entryinfo, word(zeit, 1))
call writeln(entryinfo, word(zeit, 2))
call writeln(entryinfo, ziel)
call writeln(entryinfo, titel)
call close(entryinfo)
address command
'copy '||sourcename||' to ahp4:BBS/'||zielboard||'/'||m
address 'DOPUS.1'
end
m = m + 1
end
address 'DOPUS.1'
lister select listernr name
end
lister refresh listernr full
call SetClip(zielboard, "FREE")
exit 0
AdaptTime: procedure
parse arg zeit
uhrzeit = word(zeit, 1)
datum = word(zeit, 2)
uhrzeit = left(uhrzeit, 5)
datum = left(datum, 6)||right(datum, 2)
erg = uhrzeit||" "||datum
return erg
GetLastEntry: procedure
parse arg board_name
count = 0
do forever
dummy = count + 1
if exists("ahp4:BBS/"||board_name||"/"||dummy) then do
count = count + 1
end
else do
leave
end
end
return count
init_board: procedure
parse arg board_name
if ~exists("ahp4:BBS/"||board_name) then do
address command
'makedir ahp4:BBS/'||board_name
address 'rexx_AHP'
call setclip(board_name, "FREE")
end
return